/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: #303133;
  background-color: #f5f5f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#app {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* 链接样式 */
a {
  font-weight: 500;
  color: #409eff;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #66b1ff;
}

/* 按钮基础样式 */
button {
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  color: #303133;
  font-weight: 600;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式断点 */
@media (max-width: 1024px) {
  /* 平板端优化 */
  button {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  h1 { font-size: 2em; }
  h2 { font-size: 1.5em; }
  h3 { font-size: 1.2em; }
  
  /* 移动端按钮优化 */
  button {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 32px;
  }
  
  /* Element Plus 组件移动端优化 */
  .el-button--small {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 28px;
  }
  
  .el-input__inner {
    font-size: 14px;
  }
  
  .el-select .el-input__inner {
    font-size: 14px;
  }
  
  .el-table {
    font-size: 12px;
  }
  
  .el-table .cell {
    padding: 0 4px;
    word-break: break-word;
  }
  
  .el-card {
    margin-bottom: 10px;
  }
  
  .el-card__body {
    padding: 12px;
  }
  
  /* 表单在移动端的优化 */
  .el-form--inline .el-form-item {
    display: block;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .el-form--inline .el-form-item__content {
    margin-left: 0 !important;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 12px;
  }
  
  h1 { font-size: 1.8em; }
  h2 { font-size: 1.3em; }
  h3 { font-size: 1.1em; }
  
  /* 小屏幕按钮进一步优化 */
  button {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 30px;
  }
  
  .el-button--small {
    padding: 3px 6px;
    font-size: 10px;
    min-height: 26px;
  }
  
  /* 表格进一步优化 */
  .el-table {
    font-size: 11px;
  }
  
  .el-table .el-table__cell {
    padding: 4px 2px;
  }
  
  .el-table .cell {
    padding: 0 2px;
    line-height: 1.2;
  }
  
  /* 卡片进一步优化 */
  .el-card__body {
    padding: 8px;
  }
  
  /* 对话框优化 */
  .el-dialog {
    width: 95% !important;
    margin: 5vh auto !important;
  }
  
  .el-dialog__body {
    padding: 15px;
  }
  
  /* 输入框优化 */
  .el-input__inner,
  .el-textarea__inner {
    font-size: 12px;
  }
  
  /* 下拉框优化 */
  .el-select-dropdown__item {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* 通用响应式工具类 */
.hidden-xs {
  display: block;
}

.hidden-sm {
  display: block;
}

@media (max-width: 768px) {
  .hidden-xs {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .hidden-sm {
    display: none !important;
  }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
  button,
  .el-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .el-button--small {
    min-height: 36px;
    min-width: 36px;
  }
}
